package api

import (
	"github.com/gin-gonic/gin"
	"tong/api/handler"
	"tong/api/middleware"
	"tong/pkg/jwt"
)

func Route(r *gin.Engine) {
	r.Use(middleware.Mp())
	user := r.Group("user")
	{
		user.POST("/login", handler.Login)
		user.Use(jwt.JWTAuth("2210A"))
		user.GET("/ws", handler.Chat)
	}
}
